using Rubikev.Common.DependencyInjection;
using StructureMap;

namespace Rubikev.StructureMap
{
   /// <summary>
   /// Provides object instances from the StructureMap repository
   /// </summary>
   public class TypeProvider : ITypeProvider
   {
      /// <summary>
      /// Gets the instance of the object of the given type
      /// </summary>
      /// <typeparam name="T">The type of the instance to get</typeparam>
      /// <returns>The instance of the required type</returns>
      public T GetInstance<T>()
      {
         return ObjectFactory.GetInstance<T>();
      }
   }
}